package com.tyfspring.aop;


import org.aopalliance.intercept.MethodInterceptor;

/**
 * @Description 把代理，拦截，匹配的各项属性包装到一个类中，方便在Proxy实现类中使用
 * @Author shallow
 * @Date 2023/4/16 16:11
 */

public class AdvisedSupport {

    //ProxyConfig,选择代理方法 false:jdk动态代理，true:cglib动态代理
    private boolean proxyTargetClass = false;



    //被代理的目标对象
    private TargetSource targetSource;

    //方法拦截器
    private MethodInterceptor methodInterceptor;

    //方法匹配器
    private MethodMatcher methodMatcher;

    public void setProxyTargetClass(boolean proxyTargetClass) {
        this.proxyTargetClass = proxyTargetClass;
    }

    public boolean isProxyTargetClass() {
        return proxyTargetClass;
    }

    public TargetSource getTargetSource() {
        return targetSource;
    }

    public void setTargetSource(TargetSource targetSource) {
        this.targetSource = targetSource;
    }

    public MethodInterceptor getMethodInterceptor() {
        return methodInterceptor;
    }

    public void setMethodInterceptor(MethodInterceptor methodInterceptor) {
        this.methodInterceptor = methodInterceptor;
    }

    public MethodMatcher getMethodMatcher() {
        return methodMatcher;
    }

    public void setMethodMatcher(MethodMatcher methodMatcher) {
        this.methodMatcher = methodMatcher;
    }
}
